using System;
using L=Science.Physics.GeneralPhysics;

namespace Serway.Chapter02
{
	/// <summary>
	/// Example01: Calculating the Average Velocity and Speed
	/// Find the displacement, average velocity, and average speed 
	/// of the car in Figure 2.1a between positions A and F.
	/// </summary>
	public class Example01
	{
		public Example01()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
			L.Position pA = new L.Position();
			pA.X = 30.0;
			L.Position pF = new L.Position();
			pF.X = -53.0;
			L.Displacement d = new L.Displacement(pF,pA);
			result = Convert.ToString(d.X)+"\r\n";
			L.Time t = new L.Time();
			t.Interval = 50.0;
			L.Velocity v = new L.Velocity(d,t);
			result += Convert.ToString(v.X);
		}
	}
}
